
lst = [98, 78, 99, 45, 32, 87, 66, 53, 23]
# 插入排序

def insert_sort(lst):
    for i in range(1, len(lst)):
        m = i
        for j in range(i-1, -1, -1):
            if lst[i] < lst[j]:
                m = j
            else:
                break
        lst.insert(m, lst[i])
        lst.pop(i+1)
    return lst


print(insert_sort(lst))
